Left Termination of the query pattern reach_in_3(g, g, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

reach(X, Y, Edges) :- member(.(X, .(Y, [])), Edges).
reach(X, Z, Edges) :- ','(member1(.(X, .(Y, [])), Edges), reach(Y, Z, Edges)).
member(H, .(H, L)).
member(X, .(H, L)) :- member(X, L).
member1(H, .(H, L)).
member1(X, .(H, L)) :- member1(X, L).

Queries:

reach(g,g,g).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Z, Edges) → MEMBER1_IN(.(X, .(Y, [])), Edges)
MEMBER1_IN(X, .(H, L)) → U51(X, H, L, member1_in(X, L))
MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U31(X, Z, Edges, reach_in(Y, Z, Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)
REACH_IN(X, Y, Edges) → U11(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Y, Edges) → MEMBER_IN(.(X, .(Y, [])), Edges)
MEMBER_IN(X, .(H, L)) → U41(X, H, L, member_in(X, L))
MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out
U51(x1, x2, x3, x4)  =  U51(x4)
U31(x1, x2, x3, x4)  =  U31(x4)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U41(x1, x2, x3, x4)  =  U41(x4)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x2, x3, x4)
U11(x1, x2, x3, x4)  =  U11(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Z, Edges) → MEMBER1_IN(.(X, .(Y, [])), Edges)
MEMBER1_IN(X, .(H, L)) → U51(X, H, L, member1_in(X, L))
MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U31(X, Z, Edges, reach_in(Y, Z, Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)
REACH_IN(X, Y, Edges) → U11(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Y, Edges) → MEMBER_IN(.(X, .(Y, [])), Edges)
MEMBER_IN(X, .(H, L)) → U41(X, H, L, member_in(X, L))
MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out
U51(x1, x2, x3, x4)  =  U51(x4)
U31(x1, x2, x3, x4)  =  U31(x4)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U41(x1, x2, x3, x4)  =  U41(x4)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x2, x3, x4)
U11(x1, x2, x3, x4)  =  U11(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(.(H, L)) → MEMBER1_IN(L)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
U3(x1, x2, x3, x4)  =  U3(x4)
U1(x1, x2, x3, x4)  =  U1(x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x4)
member_out(x1, x2)  =  member_out
reach_out(x1, x2, x3)  =  reach_out
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U21(x1, x2, x3, x4)  =  U21(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The argument filtering Pi contains the following mapping:
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x4)
member1_out(x1, x2)  =  member1_out(x1)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U21(x1, x2, x3, x4)  =  U21(x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(Z, Edges, member1_in(Edges))
U21(Z, Edges, member1_out(.(X, .(Y, [])))) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(member1_in(L))
member1_in(.(H, L)) → member1_out(H)
U5(member1_out(X)) → member1_out(X)

The set Q consists of the following terms:

member1_in(x0)
U5(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule REACH_IN(X, Z, Edges) → U21(Z, Edges, member1_in(Edges)) at position [2] we obtained the following new rules:

REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), U5(member1_in(x1)))
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), member1_out(x0))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Instantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), U5(member1_in(x1)))
U21(Z, Edges, member1_out(.(X, .(Y, [])))) → REACH_IN(Y, Z, Edges)
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), member1_out(x0))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(member1_in(L))
member1_in(.(H, L)) → member1_out(H)
U5(member1_out(X)) → member1_out(X)

The set Q consists of the following terms:

member1_in(x0)
U5(x0)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U21(Z, Edges, member1_out(.(X, .(Y, [])))) → REACH_IN(Y, Z, Edges) we obtained the following new rules:

U21(z1, .(.(x2, .(x3, [])), z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(.(x2, .(x3, [])), z3))
U21(z1, .(z2, z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(z2, z3))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
QDP
                                ↳ ForwardInstantiation
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U21(z1, .(.(x2, .(x3, [])), z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(.(x2, .(x3, [])), z3))
U21(z1, .(z2, z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), U5(member1_in(x1)))
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), member1_out(x0))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(member1_in(L))
member1_in(.(H, L)) → member1_out(H)
U5(member1_out(X)) → member1_out(X)

The set Q consists of the following terms:

member1_in(x0)
U5(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), member1_out(x0)) we obtained the following new rules:

REACH_IN(x0, x1, .(.(y_1, .(y_2, [])), x3)) → U21(x1, .(.(y_1, .(y_2, [])), x3), member1_out(.(y_1, .(y_2, []))))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ ForwardInstantiation
QDP
                                    ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U21(z1, .(.(x2, .(x3, [])), z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(.(x2, .(x3, [])), z3))
REACH_IN(x0, x1, .(.(y_1, .(y_2, [])), x3)) → U21(x1, .(.(y_1, .(y_2, [])), x3), member1_out(.(y_1, .(y_2, []))))
U21(z1, .(z2, z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), U5(member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(member1_in(L))
member1_in(.(H, L)) → member1_out(H)
U5(member1_out(X)) → member1_out(X)

The set Q consists of the following terms:

member1_in(x0)
U5(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U21(z1, .(.(x2, .(x3, [])), z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(.(x2, .(x3, [])), z3))
REACH_IN(x0, x1, .(.(y_1, .(y_2, [])), x3)) → U21(x1, .(.(y_1, .(y_2, [])), x3), member1_out(.(y_1, .(y_2, []))))
U21(z1, .(z2, z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y1, .(x0, x1), U5(member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(member1_in(L))
member1_in(.(H, L)) → member1_out(H)
U5(member1_out(X)) → member1_out(X)


s = REACH_IN(x0, x1, .(.(y_1, .(y_2, [])), x3')) evaluates to t =REACH_IN(y_2, x1, .(.(y_1, .(y_2, [])), x3'))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

REACH_IN(x0, x1, .(.(y_1, .(y_2, [])), x3'))U21(x1, .(.(y_1, .(y_2, [])), x3'), member1_out(.(y_1, .(y_2, []))))
with rule REACH_IN(x0', x1', .(.(y_1', .(y_2', [])), x3'')) → U21(x1', .(.(y_1', .(y_2', [])), x3''), member1_out(.(y_1', .(y_2', [])))) at position [] and matcher [y_2' / y_2, x1' / x1, x3'' / x3', y_1' / y_1, x0' / x0]

U21(x1, .(.(y_1, .(y_2, [])), x3'), member1_out(.(y_1, .(y_2, []))))REACH_IN(y_2, x1, .(.(y_1, .(y_2, [])), x3'))
with rule U21(z1, .(.(x2, .(x3, [])), z3), member1_out(.(x2, .(x3, [])))) → REACH_IN(x3, z1, .(.(x2, .(x3, [])), z3))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Z, Edges) → MEMBER1_IN(.(X, .(Y, [])), Edges)
MEMBER1_IN(X, .(H, L)) → U51(X, H, L, member1_in(X, L))
MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U31(X, Z, Edges, reach_in(Y, Z, Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)
REACH_IN(X, Y, Edges) → U11(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Y, Edges) → MEMBER_IN(.(X, .(Y, [])), Edges)
MEMBER_IN(X, .(H, L)) → U41(X, H, L, member_in(X, L))
MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)
U51(x1, x2, x3, x4)  =  U51(x2, x3, x4)
U31(x1, x2, x3, x4)  =  U31(x1, x2, x3, x4)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U41(x1, x2, x3, x4)  =  U41(x1, x2, x3, x4)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x2, x3, x4)
U11(x1, x2, x3, x4)  =  U11(x1, x2, x3, x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Z, Edges) → MEMBER1_IN(.(X, .(Y, [])), Edges)
MEMBER1_IN(X, .(H, L)) → U51(X, H, L, member1_in(X, L))
MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U31(X, Z, Edges, reach_in(Y, Z, Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)
REACH_IN(X, Y, Edges) → U11(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
REACH_IN(X, Y, Edges) → MEMBER_IN(.(X, .(Y, [])), Edges)
MEMBER_IN(X, .(H, L)) → U41(X, H, L, member_in(X, L))
MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)
U51(x1, x2, x3, x4)  =  U51(x2, x3, x4)
U31(x1, x2, x3, x4)  =  U31(x1, x2, x3, x4)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U41(x1, x2, x3, x4)  =  U41(x1, x2, x3, x4)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)
U21(x1, x2, x3, x4)  =  U21(x1, x2, x3, x4)
U11(x1, x2, x3, x4)  =  U11(x1, x2, x3, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 6 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)
MEMBER_IN(x1, x2)  =  MEMBER_IN(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

MEMBER_IN(X, .(H, L)) → MEMBER_IN(X, L)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(X, .(H, L)) → MEMBER1_IN(X, L)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
MEMBER1_IN(x1, x2)  =  MEMBER1_IN(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

MEMBER1_IN(.(H, L)) → MEMBER1_IN(L)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

reach_in(X, Z, Edges) → U2(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))
U2(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → U3(X, Z, Edges, reach_in(Y, Z, Edges))
reach_in(X, Y, Edges) → U1(X, Y, Edges, member_in(.(X, .(Y, [])), Edges))
member_in(X, .(H, L)) → U4(X, H, L, member_in(X, L))
member_in(H, .(H, L)) → member_out(H, .(H, L))
U4(X, H, L, member_out(X, L)) → member_out(X, .(H, L))
U1(X, Y, Edges, member_out(.(X, .(Y, [])), Edges)) → reach_out(X, Y, Edges)
U3(X, Z, Edges, reach_out(Y, Z, Edges)) → reach_out(X, Z, Edges)

The argument filtering Pi contains the following mapping:
reach_in(x1, x2, x3)  =  reach_in(x1, x2, x3)
U2(x1, x2, x3, x4)  =  U2(x1, x2, x3, x4)
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
U3(x1, x2, x3, x4)  =  U3(x1, x2, x3, x4)
U1(x1, x2, x3, x4)  =  U1(x1, x2, x3, x4)
member_in(x1, x2)  =  member_in(x1, x2)
U4(x1, x2, x3, x4)  =  U4(x1, x2, x3, x4)
member_out(x1, x2)  =  member_out(x1, x2)
reach_out(x1, x2, x3)  =  reach_out(x1, x2, x3)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U21(x1, x2, x3, x4)  =  U21(x1, x2, x3, x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(.(X, .(Y, [])), Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

member1_in(X, .(H, L)) → U5(X, H, L, member1_in(X, L))
member1_in(H, .(H, L)) → member1_out(H, .(H, L))
U5(X, H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The argument filtering Pi contains the following mapping:
member1_in(x1, x2)  =  member1_in(x2)
.(x1, x2)  =  .(x1, x2)
[]  =  []
U5(x1, x2, x3, x4)  =  U5(x2, x3, x4)
member1_out(x1, x2)  =  member1_out(x1, x2)
REACH_IN(x1, x2, x3)  =  REACH_IN(x1, x2, x3)
U21(x1, x2, x3, x4)  =  U21(x1, x2, x3, x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(Edges))
U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(H, L, member1_in(L))
member1_in(.(H, L)) → member1_out(H, .(H, L))
U5(H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The set Q consists of the following terms:

member1_in(x0)
U5(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule REACH_IN(X, Z, Edges) → U21(X, Z, Edges, member1_in(Edges)) at position [3] we obtained the following new rules:

REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), member1_out(x0, .(x0, x1)))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), U5(x0, x1, member1_in(x1)))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges)
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), member1_out(x0, .(x0, x1)))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), U5(x0, x1, member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(H, L, member1_in(L))
member1_in(.(H, L)) → member1_out(H, .(H, L))
U5(H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The set Q consists of the following terms:

member1_in(x0)
U5(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By instantiating [15] the rule U21(X, Z, Edges, member1_out(.(X, .(Y, [])), Edges)) → REACH_IN(Y, Z, Edges) we obtained the following new rules:

U21(z0, z1, .(z2, z3), member1_out(.(z0, .(x3, [])), .(z2, z3))) → REACH_IN(x3, z1, .(z2, z3))
U21(z0, z1, .(.(z0, .(x3, [])), z3), member1_out(.(z0, .(x3, [])), .(.(z0, .(x3, [])), z3))) → REACH_IN(x3, z1, .(.(z0, .(x3, [])), z3))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
QDP
                                ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

U21(z0, z1, .(z2, z3), member1_out(.(z0, .(x3, [])), .(z2, z3))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), member1_out(x0, .(x0, x1)))
U21(z0, z1, .(.(z0, .(x3, [])), z3), member1_out(.(z0, .(x3, [])), .(.(z0, .(x3, [])), z3))) → REACH_IN(x3, z1, .(.(z0, .(x3, [])), z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), U5(x0, x1, member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(H, L, member1_in(L))
member1_in(.(H, L)) → member1_out(H, .(H, L))
U5(H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The set Q consists of the following terms:

member1_in(x0)
U5(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), member1_out(x0, .(x0, x1))) we obtained the following new rules:

REACH_IN(x0, x1, .(.(y_4, .(y_5, [])), x3)) → U21(x0, x1, .(.(y_4, .(y_5, [])), x3), member1_out(.(y_4, .(y_5, [])), .(.(y_4, .(y_5, [])), x3)))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Instantiation
                              ↳ QDP
                                ↳ ForwardInstantiation
QDP
                                    ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

U21(z0, z1, .(z2, z3), member1_out(.(z0, .(x3, [])), .(z2, z3))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(x0, x1, .(.(y_4, .(y_5, [])), x3)) → U21(x0, x1, .(.(y_4, .(y_5, [])), x3), member1_out(.(y_4, .(y_5, [])), .(.(y_4, .(y_5, [])), x3)))
U21(z0, z1, .(.(z0, .(x3, [])), z3), member1_out(.(z0, .(x3, [])), .(.(z0, .(x3, [])), z3))) → REACH_IN(x3, z1, .(.(z0, .(x3, [])), z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), U5(x0, x1, member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(H, L, member1_in(L))
member1_in(.(H, L)) → member1_out(H, .(H, L))
U5(H, L, member1_out(X, L)) → member1_out(X, .(H, L))

The set Q consists of the following terms:

member1_in(x0)
U5(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U21(z0, z1, .(z2, z3), member1_out(.(z0, .(x3, [])), .(z2, z3))) → REACH_IN(x3, z1, .(z2, z3))
REACH_IN(x0, x1, .(.(y_4, .(y_5, [])), x3)) → U21(x0, x1, .(.(y_4, .(y_5, [])), x3), member1_out(.(y_4, .(y_5, [])), .(.(y_4, .(y_5, [])), x3)))
U21(z0, z1, .(.(z0, .(x3, [])), z3), member1_out(.(z0, .(x3, [])), .(.(z0, .(x3, [])), z3))) → REACH_IN(x3, z1, .(.(z0, .(x3, [])), z3))
REACH_IN(y0, y1, .(x0, x1)) → U21(y0, y1, .(x0, x1), U5(x0, x1, member1_in(x1)))

The TRS R consists of the following rules:

member1_in(.(H, L)) → U5(H, L, member1_in(L))
member1_in(.(H, L)) → member1_out(H, .(H, L))
U5(H, L, member1_out(X, L)) → member1_out(X, .(H, L))


s = REACH_IN(x0, x1, .(.(x0, .(y_5, [])), x3')) evaluates to t =REACH_IN(y_5, x1, .(.(x0, .(y_5, [])), x3'))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

REACH_IN(x0, x1, .(.(x0, .(x0, [])), x3'))U21(x0, x1, .(.(x0, .(x0, [])), x3'), member1_out(.(x0, .(x0, [])), .(.(x0, .(x0, [])), x3')))
with rule REACH_IN(x0', x1', .(.(y_4, .(y_5, [])), x3'')) → U21(x0', x1', .(.(y_4, .(y_5, [])), x3''), member1_out(.(y_4, .(y_5, [])), .(.(y_4, .(y_5, [])), x3''))) at position [] and matcher [y_4 / x0, x1' / x1, x3'' / x3', x0' / x0, y_5 / x0]

U21(x0, x1, .(.(x0, .(x0, [])), x3'), member1_out(.(x0, .(x0, [])), .(.(x0, .(x0, [])), x3')))REACH_IN(x0, x1, .(.(x0, .(x0, [])), x3'))
with rule U21(z0, z1, .(z2, z3), member1_out(.(z0, .(x3, [])), .(z2, z3))) → REACH_IN(x3, z1, .(z2, z3))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.